package com.zb.extend;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.zb.entity.AccounLoginInfo;
import com.zb.entity.ZjCodeLog;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * @Author WEN
 * @Date 2023/9/5 0005
 **/
@Data
@ApiModel("编码日志继承对象")
public class CodeLogExtend extends ZjCodeLog {

    public CodeLogExtend(AccounLoginInfo loginInfo, Integer type, Long codeId, String name, String content) {
        this.setId(IdWorker.getId());
        this.setCustAccId(loginInfo.getCustAccId());
        this.setCodeId(codeId);
        this.setType(type);
        this.setName(name);
        this.setContent(content);
        this.setCreateEmpId(loginInfo.getId());
        this.setCreateEmp(loginInfo.getName());
    }

    public CodeLogExtend(AccounLoginInfo loginInfo, Integer type, Long codeId, String name) {
        this.setId(IdWorker.getId());
        this.setCustAccId(loginInfo.getCustAccId());
        this.setCodeId(codeId);
        this.setType(type);
        this.setName(name);
        this.setContent("");
        this.setCreateEmpId(loginInfo.getId());
        this.setCreateEmp(loginInfo.getName());
    }
}
